<? Phpr_View::beginBlock("head") ?>
	<script type="text/javascript" src="modules/shop/resources/javascript/category_tree.js"></script>
<? Phpr_View::endBlock() ?>

<? Phpr_View::beginBlock("view") ?>
	<ul class="breadcrumbs">
		<li><a href="<?= url('/shop/categories') ?>">Categories</a></li>
		<li><?= $this->app_page_title ?></li>
	</ul>

	<?= flash() ?>
	
	<? if ($this->isHintVisible('categories_order')): ?>
		<?= Phpr_Form::openTag(array('id'=>'hint_form')) ?>
			<div class="hint">
				<p class="last">Manage category order by dragging the icons in the tree below. The category order will be taken into account on the front-end website.</p>
				<a title="Hide this hint" href="#" class="close" onclick="return hide_tip('categories_order', this)">Close</a>
			</div>
		</form>
	<? endif ?>

	<div class="toolbar">
		<?= backend_ctr_button('Return to the Category List', 'go_back', url('/shop/categories')) ?>
		<div class="clear"></div>
	</div>

	<?= Phpr_Form::openTag(array('id'=>$this->listGetFormId())) ?>
		<div id="<?= $this->listGetContainerId() ?>">
			<?= $this->listRender(array(), 'category_tree') ?>
		</div>
	</form>
<? Phpr_View::endBlock() ?>